package com.mallcloud.mall.mall.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mallcloud.mall.common.core.util.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "MallImageGroupModel", description = "图片组表")
@Data
@TableName("IMAGESGROUP")
public class MallImageGroupModel implements Serializable {
	private static final long serialVersionUID = 1L;

	@JsonSerialize(using = ToStringSerializer.class)
	@NotNull(message = "图片ID为空", groups = {ValidGroup.Update.class})
	@TableId(value = "IGID", type = IdType.ASSIGN_ID)
	@ApiModelProperty("图片ID")
	private Long id;

	@NotNull(message = "图片组ID为空")
	@ApiModelProperty("图片组ID")
	@TableField("IGGROUPID")
	private Long groupId;

	@ApiModelProperty("图片路径")
	@TableField("IGIMAGEPATH")
	private String imagePath;

	@ApiModelProperty("图片描述")
	@TableField("IGDESCRIBE")
	private String description;

	@ApiModelProperty("图片排序")
	@TableField("IGORDER")
	private Integer sortOrder;

	@ApiModelProperty("创建时间")
	@TableField(value = "IGDATETIME", fill = FieldFill.INSERT)
	private Date createTime;

	@TableLogic
	@TableField(value = "IGSTATUS", fill = FieldFill.INSERT)
	@ApiModelProperty("删除标记,1:已删除,0:正常")
	private String delFlag;

}
